package com.amado.springcloud.web.controll;

import com.amado.springcloud.user.entity.User;
import com.amado.springcloud.user.fegin.UserFeign;
import com.amado.springcloud.user.vo.SNSResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wangyl-910
 * @description
 * @date 2017/12/18
 * @see
 */
@RestController
@RequestMapping("/user")
public class UserControll {
    @Autowired
    private UserFeign userFeign;
    @GetMapping("/{id}")
    public SNSResult<User> getUser(@PathVariable Long id){
        return userFeign.getUser(id);
    }
}
